using System;
using System.Collections;

namespace Eshouse.Entity
{
	

	/// <summary>
	/// SysRole object for NHibernate mapped table 'SysRole'.
	/// </summary>
	public class SysRole
	{
		#region Member Variables
		
		protected int _id;
		protected string _roleName;
		protected string _sysModel;
		protected IList _rolePersonInfos;

		#endregion

		#region Constructors

		public SysRole() { }

		public SysRole( string roleName, string sysModel )
		{
			this._roleName = roleName;
			this._sysModel = sysModel;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public virtual  string RoleName
		{
			get { return _roleName; }
			set
			{
				if ( value != null && value.Length > 32)
					throw new ArgumentOutOfRangeException(" Invalid value for RoleName", value, value.ToString());
				_roleName = value;
			}
		}

		public virtual  string SysModel
		{
			get { return _sysModel; }
			set
			{
				if ( value != null && value.Length > 32)
					throw new ArgumentOutOfRangeException(" Invalid value for SysModel", value, value.ToString());
				_sysModel = value;
			}
		}

		public virtual IList RolePersonInfos
		{
			get
			{
				if (_rolePersonInfos==null)
				{
					_rolePersonInfos = new ArrayList();
				}
				return _rolePersonInfos;
			}
			set { _rolePersonInfos = value; }
		}

		

		#endregion
	}
	
}